package example.questionText;

import java.io.IOException;
import java.io.UnsupportedEncodingException;

import org.springframework.core.io.Resource;
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;


public class Test {

	public static void main(String[] args) {
		String path = "classpath:example/questionText/book.txt";
		try {
			PathMatchingResourcePatternResolver r = new PathMatchingResourcePatternResolver();
			Resource source = r.getResource(path);
			QuestionBeanParse<QuestionBean> aa = new QuestionBeanParse<QuestionBean>(source.getInputStream(),
					QuestionBean.class, QuestionBeanHelper.class);
			System.out.println(aa.startParse());
		} catch (UnsupportedEncodingException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}
